package com.dfbz.demo01_泛型的好处;

import java.util.ArrayList;
import java.util.Iterator;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo01 {

    public static void main(String[] args) {
        ArrayList<Province> arr=new ArrayList();

        arr.add(new Province("广东","粤","华南"));
        arr.add(new Province("广西","桂","华南"));
        arr.add(new Province("西藏","藏","西南"));
//        arr.add(new Book("《三国演义》","罗贯中"));
//        arr.add(new Book("《水浒传》","施耐庵"));


        Iterator iterator = arr.iterator();

        while (iterator.hasNext()){
            Province province = (Province) iterator.next();
            province.intro();
        }


    }
}
